package com.eastfair.venuebooking.dao;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.core.toolkit.Constants;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.eastfair.boot.mapper.SuperMapper;
import com.eastfair.venuebooking.entity.Quotation;
import com.eastfair.venuebooking.vo.PriceListSpaceVO;
import com.eastfair.venuebooking.vo.QuotationVO;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.List;

/**
 * <p>
 * Mapper 接口
 * 报价书
 * </p>
 *
 * @author linan
 * @date 2022-06-08
 */
@Repository
public interface QuotationMapper extends SuperMapper<Quotation> {

    /**
     * 分页查询报价书列表.
     *
     * @param page         the page
     * @param queryWrapper the query wrapper
     * @return the page
     */
    IPage<QuotationVO> listQuotationVOs(IPage<Quotation> page,
                                       @Param(Constants.WRAPPER) QueryWrapper<Quotation> queryWrapper);

    /**
     * 报价书id查询场地信息.
     *
     * @param quotationId the quotation id
     * @return the list
     */
    List<PriceListSpaceVO> listPriceListSpacesByQuotationId(Long quotationId);
}
